import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;


public class TestSuite {
	public static void main (String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException {
		HelloTest helloTest = new HelloTest();
		
		EchoTest echoTest = new EchoTest(args);

		MathTest mathTest = new MathTest();
		
//		MathTest mathTest = new MathTest(args);

		BitTest bitTest = new BitTest();
		
//		BitTest bitTest = new BitTest(args);
		
		TypeTest typeTest = new TypeTest();

		ObjectTest objectTest = new ObjectTest();

		ExceptionsTest exceptionsTest = new ExceptionsTest();
		
		KeywordTest keywordTest = new KeywordTest();
		
		runTutorialTest(args);
	}
	
	public static void runTutorialTest(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, SecurityException, InvocationTargetException, NoSuchMethodException {
		System.out.println("Begin tutorial base::");
		String[] testClasses = {
				"AClass","AbstractClassTest","Adder","Alpha","AlphaTwo","Anagram","ArithmeticDemo","ArrayCopyDemo","ArrayDemo","ArrayOfArraysDemo","ArrayOfArraysDemo2","ArrayOfStringsDemo","BasicMathDemo","BicycleDemo","BitDemo","BlockDemo","BostonAccentDemo","BoxDemo1","BoxDemo2","BoxDemo3","BoxDemo4","BreakDemo","BreakWithLabelDemo","Card","Card2","Cat","Cats","CharSequenceDemo","CharacterDemo","Class1","Class2","ComparisonDemo","ComputeInitials","ComputeResult","ConcatDemo","ConditionalDemo1","ConditionalDemo2","ContinueDemo","ContinueWithLabelDemo","CreateObjectDemo","DataStructure","DecimalFormatDemo","DeltaOne","DeltaTwo","DisplayDeck","DisplayDeck2","DoWhileDemo","EnhancedForDemo","EnumTest","ExponentialDemo","FPAdder","FilenameDemo","FillerTest","ForDemo","IdentifyMyParts","IfElseDemo","InsertDemo","InstanceofDemo","MaxVariablesDemo","MinDemo","MinVariablesDemo","MultiDimArrayDemo","NestedIf","NumberDemo","NumberHolderDisplay","Palindrome",/*"Planet",*/"PrePostDemo","RegionMatchesDemo","ReverseStringTest","Server","SomethingIsRight","SomethingIsWrong","StackOfInts","StackTest","StackTest2","StringBuilderDemo","StringDemo","StringSwitchDemo","StringsDemo","SwitchDemo","SwitchDemo2","SwitchDemoFallThrough","TestBikes","TestFormat","ThisHappens","ToStringDemo","TrigonometricDemo","UnaryDemo","ValueOfDemo","WarningDemo","WhatHappens","WhileDemo"
		};
		for(int i = 0; i < testClasses.length; ++i) {
			System.out.print(testClasses[i] + "-->");
			System.out.flush();
			try{ 
				Class<?> j = Class.forName(testClasses[i]);
				j.getMethod("main",String[].class).invoke(j, (Object)args);
				Object o = j.newInstance();
				System.out.flush();
			} catch (Exception e) {
				System.out.println("!error!");
				System.out.flush();
			}
		}
			
	}
	
}
